<div class="page-header settingheading">
  <h4>Post Photo/video</h4>
</div>
<?php echo form_open_multipart(null, 'id="social_post_form" class="fform-txtarea-row"'); ?>
	<div class="form-group">
		<label for="comments" class="fieldnm">Write Comments</label>
		<div class="row">
			<div class="col-sm-7">
				<textarea class="form-control" rows="6" name="message" id="massage"></textarea>
			</div>
		</div>
	</div>
	<div class="form-group">
		<label for="exampleInputFile" class="fieldnm">Upload a Picture/Video.</label>
		<div class="row">
			<div class="col-md-7">
				<div class="input-group">
					<input type="file" id="lefile" style="display:none" name="photo">
					<input id="photocover" class="form-control" type="text">
					<div class="input-group-btn">
						<a class="btn btn-success" onclick="$('input[id=lefile]').click();">Browse</a>
					</div>
					<script>
						$('input[id=lefile]').change(function(){
							$("#photocover").val($(this).val());
							var files = $('#lefile').prop("files")
							if (files && files[0])
							{
								var reader = new FileReader();
								reader.onload = function (e) {
									//$('#preview').attr('src', e.target.result);	
								};
								reader.readAsDataURL(files[0]);
							}	
						});
					</script>
				</div>
			</div>
		</div>
	</div>
	
	<div class="row">
		<div class="col-xs-12 col-md-4">
			<div class="radio radio-btn">
				<label>
					<input type="checkbox" class="check" name="facebook" id="facebook" value="Facebook" <?php if(!in_array('Facebook',$connected_list)) echo "disabled='disabled'";?>>
					<img src="<?php echo base_url(); ?>assets/front/images/fb-small.png"  alt="facebook" class="img-responsive img-gap"/>
					<div class="small-img-nm">Facebook</div>
				</label>
			</div>
		</div>
		<div class="col-xs-12 col-md-4">
			<div class="radio radio-btn">
				<label>
					<input type="checkbox" class="check" name="youtube" id="youtube" value="Youtube" <?php if(!in_array('Youtube',$connected_list)) echo "disabled='disabled'";?>>
					<img src="<?php echo base_url(); ?>assets/front/images/utube-small.png"  alt="Youtube" class="img-responsive img-gap"/>
					<div class="small-img-nm">Youtube</div>
				</label>
			</div> 
		</div>
	</div>
	<div class="row">
		<div class="col-xs-12 col-md-4">
			<div class="radio radio-btn">
				<label>
					<input type="checkbox" class="check" name="twitter" id="twitter" value="Twitter" <?php if(!in_array('Twitter',$connected_list)) echo "disabled='disabled'";?>>
					<img src="<?php echo base_url(); ?>assets/front/images/tw-small.png"  alt="Twitter" class="img-responsive img-gap"/>
					<div class="small-img-nm">Twitter</div>
				</label>
			</div>
		</div>
		<div class="col-xs-12 col-md-4">
			<div class="radio radio-btn">
				<label>
					<input type="checkbox" class="check" name="snapchat" id="snapchat" value="Snapchat" <?php if(!in_array('Snapchat',$connected_list)) echo "disabled='disabled'";?>>
					<img src="<?php echo base_url(); ?>assets/front/images/snapchat-small.png"  alt="Snapchat" class="img-responsive img-gap"/>
					<div class="small-img-nm">Snapchat</div>
				</label>
			</div> 
		</div>
	</div>
	<div class="row">
		<div class="col-xs-12 col-md-4">
			<div class="radio radio-btn">
				<label>
					<input type="checkbox" class="check" name="instagram" id="instagram" value="Instagram" <?php if(!in_array('Instagram',$connected_list)) echo "disabled='disabled'";?>>
					<img src="<?php echo base_url(); ?>assets/front/images/insta-small.png"  alt="Instagram" class="img-responsive img-gap"/>
					<div class="small-img-nm">Instagram</div>.
				</label>
			</div>
		</div>
		<div class="col-xs-12 col-md-4">
			<div class="radio radio-btn">
				<label>
					<input type="checkbox" class="check" name="tumblr" id="tumblr" value="Tumblr" <?php if(!in_array('Tumblr',$connected_list)) echo "disabled='disabled'";?>>
					<img src="<?php echo base_url(); ?>assets/front/images/tumblr-small.png"  alt="Tumblr" class="img-responsive img-gap"/>
					<div class="small-img-nm">Tumblr</div>
				</label>
			</div>
		</div>  
	</div> 
	<div class="row">
		<div class="form-group">
			<div class="col-xs-12 col-md-4 submit-btn-div">  <!--col-sm-offset-1-->
				<button class="btn btn-default submit-btn" type="submit">Submit</button>
			</div>
		</div>
	</div>
<?php echo form_close(); ?>
<?php if(isset($message)){?>
<div class="row">
	<div class="col-md-12">
		<?php echo $message;?>
	</div>
</div>		
<?}?>